home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
027a
/
clipio.zip
/
BLAKSYST.PRG
< prev
next >
Wrap
Text File
|
1990-06-23
|
9KB
|
324 lines
parameters choice
* begin
do case
case choice = 1
setcolors()
case choice = 2
blakpack()
case choice = 3
setmodem()
case choice = 4
setprint()
endcase
save all like _* to blakbook.mem
return
*----------------------------------SETCOLORS-----------------------------------*
function setcolors
private choice, choices[19]
* begin
if !iscolor()
prompt(-1, -1, 'You monitor does not support colors. Press any key to continue...', .t.)
return ''
endif
choices[1] = [Address enhanced]
choices[2] = [Address standard]
choices[3] = [Address unselected]
choices[4] = [Families enhanced]
choices[5] = [Families standard]
choices[6] = [Families unselected]
choices[7] = [Frame]
choices[8] = [Help Descriptions]
choices[9] = [Help Keys]
choices[10] = [Members enhanced]
choices[11] = [Members standard]
choices[12] = [Members unselected]
choices[13] = [Menus enhanced]
choices[14] = [Menus standard]
choices[15] = [Menus unselected]
choices[16] = [Notes]
choices[17] = [Prompts enhanced]
choices[18] = [Prompts standard]
choices[19] = [Prompts unselected]
vpushstate()
choice = 1
do while (choice > 0)
vsetcolor(_c_menu_st, _c_menu_en, _c_menu_un)
choice = menu(2, 35, 'Colors', choices, choice)
do case
case choice = 1
_c_addr_en = choose_color(_c_addr_en)
case choice = 2
_c_addr_st = choose_color(_c_addr_st)
case choice = 3
_c_addr_un = choose_color(_c_addr_un)
case choice = 4
_c_fami_en = choose_color(_c_fami_en)
case choice = 5
_c_fami_st = choose_color(_c_fami_st)
case choice = 6
_c_fami_un = choose_color(_c_fami_un)
case choice = 7
_c_fram = choose_color(_c_fram)
case choice = 8
_c_help = choose_color(_c_help)
case choice = 9
_c_hlpk = choose_color(_c_hlpk)
case choice = 10
_c_memb_en = choose_color(_c_memb_en)
case choice = 11
_c_memb_st = choose_color(_c_memb_st)
case choice = 12
_c_memb_un = choose_color(_c_memb_un)
case choice = 13
_c_menu_en = choose_color(_c_menu_en)
case choice = 14
_c_menu_st = choose_color(_c_menu_st)
case choice = 15
_c_menu_un = choose_color(_c_menu_un)
case choice = 16
_c_note = choose_color(_c_note)
case choice = 17
_c_wind_en = choose_color(_c_wind_en)
case choice = 18
_c_wind_st = choose_color(_c_wind_st)
case choice = 19
_c_wind_un = choose_color(_c_wind_un)
endcase
vpopscrn()
drawscreen()
dispmembers()
dispaddress()
dispnotes()
enddo
vpopstate()
return ''
*--------------------------------CHOOSE_COLOR----------------------------------*
function choose_color
parameters init_color
private ulr, ulc, row, col, rowcol, oldcursor, oldbutton, oldctrl
* begin
ulr = 2
ulc = 50
vpushstate()
mpushstate()
vpushscrn(ulr, ulc, ulr+16+1, ulc+16+1)
*** draw selection screen
@ ulr, ulc to ulr+16+1, ulc+16+1
vfillattr(ulr, ulc, ulr+16+1, ulc+16+1, _c_wind_st)
ulr = ulr + 1
ulc = ulc + 1
oldctrl = msavectrl(ulr, ulc, ulr+15, ulc+15)
mdefctrl(ulr, ulc, ulr+15, ulc+15, 250)
for row = 0 to 15
rowcol = row * 16
for col = 0 to 15
vputstrc( ulr+row, ulc+col, chr(7), rowcol + col )
next col
next row
row = int(init_color / 16)
col = init_color % 16
old_row = 15
old_col = 15
lastkey = 0
do while ((lastkey <> 13) .and. (lastkey <> 27))
*** account for any movement on the screen
vputstrc(ulr+old_row, ulc+old_col, chr(7), old_row * 16 + old_col)
old_row = row
old_col = col
vputstrc(ulr+old_row, ulc+old_col, chr(15), old_row * 16 + old_col)
*** get another keystroke and move cursor if necessary
lastkey = keyget()
do case
case (lastkey = -131) .and. (mgetbutton() == 'L ') .and. (mgetctrl() = 250)
row = mrow() - ulr
col = mcol() - ulc
keyinsert(13)
case (lastkey = -72) && up arrow
row = (row + 15) % 16
case (lastkey = -80) && down arrow
row = (row + 1) % 16
case (lastkey = -77) && right arrow
col = (col + 1) % 16
case (lastkey = -75) && left arrow
col = (col + 15) % 16
endcase
enddo
vpopscrn()
vpopstate()
mpopstate()
mrestctrl(ulr, ulc, ulr+15, ulc+15, oldctrl)
if lastkey = 13
return( row * 16 + col )
else
return( init_color )
endif
* end
*----------------------------------BLAKPACK------------------------------------*
function blakpack
* begin
prompt(12, -1, 'Removing deleted records and reindexing. Please wait...', .f.)
select MEMBERS
set filter to
set index to
pack
index on UNIQUE + upper(NAME) to MEMBUNIQ
index on right(dtos(BIRTHDAY), 4) to MEMBBIRT
index on right(dtos(ANNIVERS), 4) to MEMBANNI
select FAMILIES
set filter to
set index to
pack
index on upper(NAME) + PHONE to FAMINAME
index on UNIQUE to FAMIUNIQ
select MEMBERS
set index to MEMBUNIQ, MEMBBIRT, MEMBANNI
set filter to (!deleted())
select FAMILIES
set index to FAMINAME, FAMIUNIQ
set filter to (!deleted())
go top
lastrecno = 0
vpopscrn()
return ''
*----------------------------------SETMODEM------------------------------------*
function setmodem
private choice, choices[6], vars[6], lens[6]
choices[1] = 'Area code: '
choices[2] = 'Local prefix:'
choices[3] = 'Local suffix:'
choices[4] = 'Long prefix: '
choices[5] = 'Long suffix: '
choices[6] = 'Port: '
vars[1] = [_areacode]
vars[2] = [_localpre]
vars[3] = [_localsuf]
vars[4] = [_longpre]
vars[5] = [_longsuf]
vars[6] = [_comport]
lens[1] = 3
lens[2] = 10
lens[3] = 10
lens[4] = 10
lens[5] = 10
lens[6] = 4
* begin
vpushstate()
choice = 1
do while (choice > 0)
for lcv = 1 to 6
variable = vars[lcv]
choices[lcv] = left(choices[lcv], 13) + trim(&variable)
next lcv
vsetcolor(_c_menu_st, _c_menu_en, _c_menu_un)
choice = menu(2, 35, 'Printer Codes', choices, choice)
if choice > 0
variable = vars[choice]
&variable = pad(&variable, lens[choice])
vsetcolor(_c_wind_st, _c_wind_en, _c_wind_un)
prompt(10, -1, 'Enter ' + trim(left(choices[choice], 13)) + ': ' + space(lens[choice]), .f.)
@ row(), col() - lens[choice] get &variable
vsetcursor(.t.)
read
vsetcursor(.f.)
vpopscrn()
vsetcolor(_c_menu_st, _c_menu_en, _c_menu_un)
endif
vpopscrn()
enddo
vpopstate()
return ''
*----------------------------------SETPRINT------------------------------------*
function setprint
private choice, choices[5], oldcolor, vars[5], lcv, ptr, variable
vars[1] = '_boldon'
vars[2] = '_boldoff'
vars[3] = '_17cpi'
vars[4] = '_12cpi'
vars[5] = '_10cpi'
choices[1] = [Bold on: ]
choices[2] = [Bold off: ]
choices[3] = [Compressed:]
choices[4] = [Elite: ]
choices[5] = [Pica: ]
* begin
vpushstate()
choice = 1
do while (choice > 0)
for lcv = 1 to 5
choices[lcv] = left(choices[lcv], 11)
variable = vars[lcv]
variable = &variable
for ptr = 1 to 5
choices[lcv] = choices[lcv] + ltrim(str(asc(substr(variable, ptr, 1)), 3, 0)) + ', '
next ptr
choices[lcv] = left(choices[lcv], len(choices[lcv]) - 2)
next lcv
vsetcolor(_c_menu_st, _c_menu_en, _c_menu_un)
choice = menu(2, 50, 'Printer Codes', choices, choice)
if choice > 0
variable = vars[choice]
&variable = getpcode(&variable)
endif
vpopscrn()
enddo
vpopstate()
return ''
*----------------------------------GETPCODE------------------------------------*
function getpcode
parameters code
private lcv, ns[5], initcol
* begin
afill(ns, 0)
for lcv = 1 to len(code)
ns[lcv] = asc(substr(code, lcv, 1))
next lcv
vsetcolor(_c_wind_st, _c_wind_en, _c_wind_un)
prompt(10, -1, 'Enter ' + trim(left(choices[choice], 11)) + ' codes in decimal: ', .f.)
initcol = col() - 24
for lcv = 1 to 5
@ row(), (lcv * 4) + initcol get ns[lcv] picture '###'
next lcv
vsetcursor(.t.)
read
vsetcursor(.f.)
vpopscrn()
vsetcolor(_c_menu_st, _c_menu_en, _c_menu_un)
code = ''
for lcv = 1 to 5
code = code + chr(ns[lcv])
next lcv
return code